<?php if (count($currencies) > 1) { ?>
<form action="<?php echo $action; ?>"  class="form-currency" method="post" enctype="multipart/form-data">
<select class="drop currency">
    <option class="label"><?php echo $text_currency; ?></option>
    <?php foreach ($currencies as $currency) { ?>
		    <?php if ($currency['code'] == $currency_code) { ?>
			    <?php if ($currency['symbol_left']) { ?>
			    <option value="" selected ><?php echo $currency['symbol_left']; ?></option>
			    <?php } else { ?>
			   <option value="" selected ><?php echo $currency['symbol_right']; ?></option>
			    <?php } ?>
		    <?php } else { ?>
			    <?php if ($currency['symbol_left']) { ?>
			    <option value="<?php echo $currency['code']; ?>" ><?php echo $currency['symbol_left']; ?></option>
			    <?php } else { ?>
			    <option value="<?php echo $currency['code']; ?>" ><?php echo $currency['symbol_right']; ?></option>
			    <?php } ?>
	    <?php } ?>
    <?php } ?>
</select>
    <input type="hidden" name="currency_code" value="" />
    <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
</form>
<?php } ?> 
<script>
$(function(){
	$(".drop.currency").change(function(e){
		e.preventDefault();
		if($(this).val()){
			$("[name='currency_code']").val($(this).val());
			$(".form-currency").submit();
		}
	});
});
</script>